
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta charset="utf-8"></meta>
		<meta name="generator" content="JsDoc Toolkit"></meta>
		<title>enchant.Core | JsDoc Reference</title>

		<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"></meta>
		<meta name="mobileoptimized" content="0"></meta>
	
		<link rel="stylesheet" href="../css/all.css" media="all"></link>
		<link rel="stylesheet" href="../css/handheld.css" media="only screen and (max-width: 660px)"></link>
		<link rel="stylesheet" href="../css/handheld.css" media="handheld"></link>
		<link rel="stylesheet" href="../css/screen.css" media="screen and (min-width: 661px)"></link>

		<script src="../javascript/all.js"></script>
		<!--[if lt IE 9]>
			<script src="../javascript/html5.js"></script>
		<![endif]-->
	</head>

	<body>

<div class="index">
	<div class="menu">
		<div class="indexLinks">
			<a href="../index.html">Classes</a>
			<a href="../files.html">Files</a>
		</div>
	
		<h2 class="heading1">Classes</h2>
		
		<input type="text" name="classFilter" class="classFilter" id="ClassFilter" placeholder="Filter"></input>
		
		<nav>
			<ul class="classList" id="ClassList">
				
					<li><a href="../symbols/_global_.html">_global_</a></li>
				
					<li><a href="../symbols/enchant.Action.html">enchant<span class='break'> </span>.<span class='break'> </span>Action</a></li>
				
					<li><a href="../symbols/enchant.ActionEventTarget.html">enchant<span class='break'> </span>.<span class='break'> </span>ActionEventTarget</a></li>
				
					<li><a href="../symbols/enchant.BinaryInputManager.html">enchant<span class='break'> </span>.<span class='break'> </span>BinaryInputManager</a></li>
				
					<li><a href="../symbols/enchant.BinaryInputSource.html">enchant<span class='break'> </span>.<span class='break'> </span>BinaryInputSource</a></li>
				
					<li><a href="../symbols/enchant.CanvasLayer.html">enchant<span class='break'> </span>.<span class='break'> </span>CanvasLayer</a></li>
				
					<li><a href="../symbols/enchant.CanvasScene.html">enchant<span class='break'> </span>.<span class='break'> </span>CanvasScene</a></li>
				
					<li><a href="../symbols/enchant.Class.html">enchant<span class='break'> </span>.<span class='break'> </span>Class</a></li>
				
					<li><a href="../symbols/enchant.Core.html">enchant<span class='break'> </span>.<span class='break'> </span>Core</a></li>
				
					<li><a href="../symbols/enchant.Deferred.html">enchant<span class='break'> </span>.<span class='break'> </span>Deferred</a></li>
				
					<li><a href="../symbols/enchant.DOMScene.html">enchant<span class='break'> </span>.<span class='break'> </span>DOMScene</a></li>
				
					<li><a href="../symbols/enchant.DOMSound.html">enchant<span class='break'> </span>.<span class='break'> </span>DOMSound</a></li>
				
					<li><a href="../symbols/enchant.Easing.html">enchant<span class='break'> </span>.<span class='break'> </span>Easing</a></li>
				
					<li><a href="../symbols/enchant.Entity.html">enchant<span class='break'> </span>.<span class='break'> </span>Entity</a></li>
				
					<li><a href="../symbols/enchant.ENV.html">enchant<span class='break'> </span>.<span class='break'> </span>ENV</a></li>
				
					<li><a href="../symbols/enchant.Event.html">enchant<span class='break'> </span>.<span class='break'> </span>Event</a></li>
				
					<li><a href="../symbols/enchant.EventTarget.html">enchant<span class='break'> </span>.<span class='break'> </span>EventTarget</a></li>
				
					<li><a href="../symbols/enchant.Game.html">enchant<span class='break'> </span>.<span class='break'> </span>Game</a></li>
				
					<li><a href="../symbols/enchant.Group.html">enchant<span class='break'> </span>.<span class='break'> </span>Group</a></li>
				
					<li><a href="../symbols/enchant.InputManager.html">enchant<span class='break'> </span>.<span class='break'> </span>InputManager</a></li>
				
					<li><a href="../symbols/enchant.InputSource.html">enchant<span class='break'> </span>.<span class='break'> </span>InputSource</a></li>
				
					<li><a href="../symbols/enchant.KeyboardInputManager.html">enchant<span class='break'> </span>.<span class='break'> </span>KeyboardInputManager</a></li>
				
					<li><a href="../symbols/enchant.KeyboardInputSource.html">enchant<span class='break'> </span>.<span class='break'> </span>KeyboardInputSource</a></li>
				
					<li><a href="../symbols/enchant.Label.html">enchant<span class='break'> </span>.<span class='break'> </span>Label</a></li>
				
					<li><a href="../symbols/enchant.LoadingScene.html">enchant<span class='break'> </span>.<span class='break'> </span>LoadingScene</a></li>
				
					<li><a href="../symbols/enchant.Map.html">enchant<span class='break'> </span>.<span class='break'> </span>Map</a></li>
				
					<li><a href="../symbols/enchant.Node.html">enchant<span class='break'> </span>.<span class='break'> </span>Node</a></li>
				
					<li><a href="../symbols/enchant.ParallelAction.html">enchant<span class='break'> </span>.<span class='break'> </span>ParallelAction</a></li>
				
					<li><a href="../symbols/enchant.Scene.html">enchant<span class='break'> </span>.<span class='break'> </span>Scene</a></li>
				
					<li><a href="../symbols/enchant.Sprite.html">enchant<span class='break'> </span>.<span class='break'> </span>Sprite</a></li>
				
					<li><a href="../symbols/enchant.Surface.html">enchant<span class='break'> </span>.<span class='break'> </span>Surface</a></li>
				
					<li><a href="../symbols/enchant.Timeline.html">enchant<span class='break'> </span>.<span class='break'> </span>Timeline</a></li>
				
					<li><a href="../symbols/enchant.Tween.html">enchant<span class='break'> </span>.<span class='break'> </span>Tween</a></li>
				
					<li><a href="../symbols/enchant.WebAudioSound.html">enchant<span class='break'> </span>.<span class='break'> </span>WebAudioSound</a></li>
				
			</ul>
		</nav>
	</div>
	<div class="fineprint" style="clear:both">
		
		Documentation generator: <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0<br />
		Template: <a href="http://www.thebrightlines.com/2010/05/06/new-template-for-jsdoctoolkit-codeview/" target="_blank">Codeview</a> 1.2<br />
		Generated on: 2016-0-4 21:06
	</div>
</div>

<div class="index indexStatic"></div>

<div class="content">
	<div class="innerContent">
		<h1 class="classTitle">
			
			Class <span>enchant.Core</span>
		</h1>
		
		<div class="intro">
			<p class="description summary">
				A class for controlling the core’s main loop and scenes.

There can be only one instance at a time. When the
constructor is executed while an instance exists, the
existing instance will be overwritten. The existing instance
can be accessed from <a href="../symbols/enchant.Core.html#.instance">enchant.Core.instance</a>.
			</p>
				
			
				<ul class="summary">
					
					
					
						<li>Defined in: <a href="../symbols/src/lang_en_enchant.js.html">enchant.js</a></li>
					
						<li>Extends <span class="fixedFont">
						<a href="../symbols/enchant.EventTarget.html">enchant.EventTarget</a></span></li>
					
				</ul>
			
		</div>
		
		
			<div class="props">
				<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class enchant.Core.">
					<caption class="sectionTitle">Class Summary</caption>
					<thead>
						<tr>
							<th scope="col">Constructor Attributes</th>
							<th scope="col">Constructor Name and Description</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td class="attributes">&nbsp;</td>
							<td class="nameDescription" >
								<div class="fixedFont">
									<b><a href="../symbols/enchant.Core.html#constructor">enchant.Core</a></b>(width, height)
								</div>
								<div class="description"></div>
							</td>
						</tr>
					</tbody>
				</table>
			</div>
		
		
		
			
			
				<div class="props">
					<table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class enchant.Core.">
						<caption class="sectionTitle">Field Summary</caption>
						
						<thead>
							<tr>
								<th scope="col">Field Attributes</th>
								<th scope="col">Field Name and Description</th>
							</tr>
						</thead>
						
						<tbody>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/enchant.Core.html#assets">assets</a></b>
										</div>
										<div class="description">Object which stores loaded assets using their paths as keys.</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/enchant.Core.html#currentScene">currentScene</a></b>
										</div>
										<div class="description">The Scene which is currently displayed.</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/enchant.Core.html#fps">fps</a></b>
										</div>
										<div class="description">The frame rate of the core.</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/enchant.Core.html#frame">frame</a></b>
										</div>
										<div class="description">The number of frames processed since the core was started.</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/enchant.Core.html#height">height</a></b>
										</div>
										<div class="description">The height of the core screen.</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/enchant.Core.html#input">input</a></b>
										</div>
										<div class="description">Object that saves the current input state for the core.</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&lt;static&gt; &nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										enchant.Core.<b><a href="../symbols/enchant.Core.html#.instance">instance</a></b>
										</div>
										<div class="description">The current Core instance.</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/enchant.Core.html#loadingScene">loadingScene</a></b>
										</div>
										<div class="description">The Scene to be displayed during loading.</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/enchant.Core.html#ready">ready</a></b>
										</div>
										<div class="description">Indicates whether or not the core can be executed.</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/enchant.Core.html#rootScene">rootScene</a></b>
										</div>
										<div class="description">The root Scene.</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/enchant.Core.html#running">running</a></b>
										</div>
										<div class="description">Indicates whether or not the core is currently running.</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/enchant.Core.html#scale">scale</a></b>
										</div>
										<div class="description">The scaling of the core rendering.</div>
									</td>
								</tr>
							
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">
										<b><a href="../symbols/enchant.Core.html#width">width</a></b>
										</div>
										<div class="description">The width of the core screen.</div>
									</td>
								</tr>
							
						</tbody>
					</table>
				</div>
			
			
			
				<dl class="inheritsList">
				
				</dl>
			
		
<!--
#### METHODS SUMMARY
-->
		
			
			
			<div class="props">
				<h2 class="sectionTitle">Method Summary</h2>
				
				
					<table class="summaryTable" id="MethodsList" cellspacing="0" summary="A summary of the methods documented in the class enchant.Core.">
						<thead>
							<tr>
								<th scope="col">Method Attributes</th>
								<th scope="col">Method Name and Description</th>
							</tr>
						</thead>
						
						<tbody>
							
							
								<tr
									 class='item0'
								>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont"><b><a href="../symbols/enchant.Core.html#debug">debug</a></b>()
										</div>
										<div class="description">Start application in debug mode.</div>
									</td>
								</tr>
							
								<tr
									 class='item1'
								>
									<td class="attributes">&lt;static&gt; &nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont">enchant.Core.<b><a href="../symbols/enchant.Core.html#.findExt">findExt</a></b>(path)
										</div>
										<div class="description">Get the file extension from a path.</div>
									</td>
								</tr>
							
								<tr
									 class='item2'
								>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont"><b><a href="../symbols/enchant.Core.html#getElapsedTime">getElapsedTime</a></b>()
										</div>
										<div class="description">Get the core time (not actual) elapsed since <a href="../symbols/enchant.Core.html#start">enchant.Core#start</a> was called.</div>
									</td>
								</tr>
							
								<tr
									 class='item3'
								>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont"><b><a href="../symbols/enchant.Core.html#keybind">keybind</a></b>(key, button)
										</div>
										<div class="description">Bind a key code to an enchant.js button.</div>
									</td>
								</tr>
							
								<tr
									 class='item4'
								>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont"><b><a href="../symbols/enchant.Core.html#keyunbind">keyunbind</a></b>(key)
										</div>
										<div class="description">Delete the key binding for the given key.</div>
									</td>
								</tr>
							
								<tr
									 class='item5'
								>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont"><b><a href="../symbols/enchant.Core.html#load">load</a></b>(src, alias, callback, onerror)
										</div>
										<div class="description">Loads a file.</div>
									</td>
								</tr>
							
								<tr
									 class='item6'
								>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont"><b><a href="../symbols/enchant.Core.html#pause">pause</a></b>()
										</div>
										<div class="description">Stops the core.</div>
									</td>
								</tr>
							
								<tr
									 class='item7'
								>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont"><b><a href="../symbols/enchant.Core.html#popScene">popScene</a></b>()
										</div>
										<div class="description">Ends the current Scene and returns to the previous Scene.</div>
									</td>
								</tr>
							
								<tr
									 class='item8'
								>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont"><b><a href="../symbols/enchant.Core.html#preload">preload</a></b>(assets)
										</div>
										<div class="description">File preloader.</div>
									</td>
								</tr>
							
								<tr
									 class='item9'
								>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont"><b><a href="../symbols/enchant.Core.html#pushScene">pushScene</a></b>(scene)
										</div>
										<div class="description">Switches to a new Scene.</div>
									</td>
								</tr>
							
								<tr
									 class='item10'
								>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont"><b><a href="../symbols/enchant.Core.html#removeScene">removeScene</a></b>(scene)
										</div>
										<div class="description">Removes a Scene from the Scene stack.</div>
									</td>
								</tr>
							
								<tr
									 class='item11'
								>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont"><b><a href="../symbols/enchant.Core.html#replaceScene">replaceScene</a></b>(scene)
										</div>
										<div class="description">Overwrites the current Scene with a new Scene.</div>
									</td>
								</tr>
							
								<tr
									 class='item12'
								>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont"><b><a href="../symbols/enchant.Core.html#resume">resume</a></b>()
										</div>
										<div class="description">Resumes core operations.</div>
									</td>
								</tr>
							
								<tr
									 class='item13'
								>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont"><b><a href="../symbols/enchant.Core.html#start">start</a></b>(deferred)
										</div>
										<div class="description">Start the core.</div>
									</td>
								</tr>
							
								<tr
									 class='item14'
								>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription">
										<div class="fixedFont"><b><a href="../symbols/enchant.Core.html#stop">stop</a></b>()
										</div>
										<div class="description">Stops the core.</div>
									</td>
								</tr>
							
						</tbody>
					</table>
				
			
				
					<dl class="inheritsList" id="MethodsListInherited">
					<dt>Methods borrowed from class <span class='fixedFont'><a href="../symbols/enchant.EventTarget.html">enchant.EventTarget</a></span>: </dt><dd><span class='fixedFont'><a href="../symbols/enchant.EventTarget.html#addEventListener">addEventListener</a></span></dd> <dd><span class='fixedFont'><a href="../symbols/enchant.EventTarget.html#clearEventListener">clearEventListener</a></span></dd> <dd><span class='fixedFont'><a href="../symbols/enchant.EventTarget.html#dispatchEvent">dispatchEvent</a></span></dd> <dd><span class='fixedFont'><a href="../symbols/enchant.EventTarget.html#on">on</a></span></dd> <dd><span class='fixedFont'><a href="../symbols/enchant.EventTarget.html#removeEventListener">removeEventListener</a></span></dd>
					</dl>
				
			</div>
		
		
<!--
#### EVENTS SUMMARY
-->
		
<!--
#### CONSTRUCTOR DETAILS
-->
		
			<div class="details props">
				<div class="innerProps">
					<h2 class="sectionTitle" id="constructor">
						Class Detail
					</h2>
					
					<div class="fixedFont">
						<b>enchant.Core</b>(width, height)
					</div>
					
					<div class="description">
						
						
					</div>
					
					
				
					
						<dl class="detailList params">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<span class="light fixedFont">{Number}</span>  <b>width</b>
									<i>Optional, Default: 320</i>
								</dt>
								<dd>The width of the core viewport.</dd>
							
								<dt>
									<span class="light fixedFont">{Number}</span>  <b>height</b>
									<i>Optional, Default: 320</i>
								</dt>
								<dd>The height of the core viewport.</dd>
							
						</dl>
					
					
					
				</div>
			</div>
		
<!--
#### FIELD DETAILS
-->
		
			<div class="details props">
				<div class="innerProps">
					<h2 class="sectionTitle">
						Field Detail
					</h2>
					
					
						<div class="fixedFont heading" id="assets">
							<span class='lighter'>
							
							</span>
							
							<span class="light">{Object}</span>
							
							<b>assets</b>							
						</div>
						
						<div class="description">
							Object which stores loaded assets using their paths as keys.
							
							
							
						</div>
						
						
							
						
						<div class="hr"></div>
					
						<div class="fixedFont heading" id="currentScene">
							<span class='lighter'>
							
							</span>
							
							<span class="light">{<a href="../symbols/enchant.Scene.html">enchant.Scene</a>}</span>
							
							<b>currentScene</b>							
						</div>
						
						<div class="description">
							The Scene which is currently displayed. This Scene is on top of the Scene stack.
							
							
							
						</div>
						
						
							
						
						<div class="hr"></div>
					
						<div class="fixedFont heading" id="fps">
							<span class='lighter'>
							
							</span>
							
							<span class="light">{Number}</span>
							
							<b>fps</b>							
						</div>
						
						<div class="description">
							The frame rate of the core.
							
							
							
						</div>
						
						
							
						
						<div class="hr"></div>
					
						<div class="fixedFont heading" id="frame">
							<span class='lighter'>
							
							</span>
							
							<span class="light">{Number}</span>
							
							<b>frame</b>							
						</div>
						
						<div class="description">
							The number of frames processed since the core was started.
							
							
							
						</div>
						
						
							
						
						<div class="hr"></div>
					
						<div class="fixedFont heading" id="height">
							<span class='lighter'>
							
							</span>
							
							<span class="light">{Number}</span>
							
							<b>height</b>							
						</div>
						
						<div class="description">
							The height of the core screen.
							
							
							
						</div>
						
						
							
						
						<div class="hr"></div>
					
						<div class="fixedFont heading" id="input">
							<span class='lighter'>
							
							</span>
							
							<span class="light">{Object}</span>
							
							<b>input</b>							
						</div>
						
						<div class="description">
							Object that saves the current input state for the core.
							
							
							
						</div>
						
						
							
						
						<div class="hr"></div>
					
						<div class="fixedFont heading" id=".instance">
							<span class='lighter'>
							&lt;static&gt; 
							</span>
							
							<span class="light">{<a href="../symbols/enchant.Core.html">enchant.Core</a>}</span>
							
							<span class="light">enchant.Core.</span><b>instance</b>							
						</div>
						
						<div class="description">
							The current Core instance.
							
							
							
						</div>
						
						
							
						
						<div class="hr"></div>
					
						<div class="fixedFont heading" id="loadingScene">
							<span class='lighter'>
							
							</span>
							
							<span class="light">{<a href="../symbols/enchant.Scene.html">enchant.Scene</a>}</span>
							
							<b>loadingScene</b>							
						</div>
						
						<div class="description">
							The Scene to be displayed during loading.
							
							
							
						</div>
						
						
							
						
						<div class="hr"></div>
					
						<div class="fixedFont heading" id="ready">
							<span class='lighter'>
							
							</span>
							
							<span class="light">{Boolean}</span>
							
							<b>ready</b>							
						</div>
						
						<div class="description">
							Indicates whether or not the core can be executed.
							
							
							
						</div>
						
						
							
						
						<div class="hr"></div>
					
						<div class="fixedFont heading" id="rootScene">
							<span class='lighter'>
							
							</span>
							
							<span class="light">{<a href="../symbols/enchant.Scene.html">enchant.Scene</a>}</span>
							
							<b>rootScene</b>							
						</div>
						
						<div class="description">
							The root Scene. The Scene at the bottom of the Scene stack.
							
							
							
						</div>
						
						
							
						
						<div class="hr"></div>
					
						<div class="fixedFont heading" id="running">
							<span class='lighter'>
							
							</span>
							
							<span class="light">{Boolean}</span>
							
							<b>running</b>							
						</div>
						
						<div class="description">
							Indicates whether or not the core is currently running.
							
							
							
						</div>
						
						
							
						
						<div class="hr"></div>
					
						<div class="fixedFont heading" id="scale">
							<span class='lighter'>
							
							</span>
							
							<span class="light">{Number}</span>
							
							<b>scale</b>							
						</div>
						
						<div class="description">
							The scaling of the core rendering.
							
							
							
						</div>
						
						
							
						
						<div class="hr"></div>
					
						<div class="fixedFont heading" id="width">
							<span class='lighter'>
							
							</span>
							
							<span class="light">{Number}</span>
							
							<b>width</b>							
						</div>
						
						<div class="description">
							The width of the core screen.
							
							
							
						</div>
						
						
							
						
						
					
				</div>
			</div>
		
<!--
#### METHOD DETAILS
-->		
		
			<div class="details props">
				<div class="innerProps">
					<h2 class="sectionTitle">
						Method Detail
					</h2>
					
					<ul class="methodDetail" id="MethodDetail">
						
						
							<li 
								 class='item0'
							>
								<div class="fixedFont heading" id="debug">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{<a href="../symbols/enchant.Deferred.html">enchant.Deferred</a>}</span>
									
									<b>debug</b>()
								</div>
								
								<div class="description">
									Start application in debug mode.

Core debug mode can be turned on even if the
enchant.Core#_debug flag is already set to true.
									
									
									
									
								</div>
								
								
								
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{<a href="../symbols/enchant.Deferred.html">enchant.Deferred</a>}</span> </dd>
											
										
										
										
										
										
									
									</dl>
								
								<div class="hr"></div>
							</li>
						
							<li 
								 class='item1'
							>
								<div class="fixedFont heading" id=".findExt">
									<span class='lighter'>
									&lt;static&gt; 
									</span>
									
									<span class="light">{*}</span>
									
									<span class="light">enchant.Core.</span><b>findExt</b>(path)
								</div>
								
								<div class="description">
									Get the file extension from a path.
									
									
									
									
								</div>
								
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<span class="light fixedFont">{String}</span> <b>path</b>
												
											</dt>
											<dd>file path.</dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{*}</span> </dd>
											
										
										
										
										
										
									
									</dl>
								
								<div class="hr"></div>
							</li>
						
							<li 
								 class='item2'
							>
								<div class="fixedFont heading" id="getElapsedTime">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{Number}</span>
									
									<b>getElapsedTime</b>()
								</div>
								
								<div class="description">
									Get the core time (not actual) elapsed since <a href="../symbols/enchant.Core.html#start">enchant.Core#start</a> was called.
									
									
									
									
								</div>
								
								
								
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{Number}</span> Time elapsed (in seconds).</dd>
											
										
										
										
										
										
									
									</dl>
								
								<div class="hr"></div>
							</li>
						
							<li 
								 class='item3'
							>
								<div class="fixedFont heading" id="keybind">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{<a href="../symbols/enchant.Core.html">enchant.Core</a>}</span>
									
									<b>keybind</b>(key, button)
								</div>
								
								<div class="description">
									Bind a key code to an enchant.js button.

Binds the given key code to the given enchant.js button
('left', 'right', 'up', 'down', 'a', 'b').
									
									
									
									
								</div>
								
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<span class="light fixedFont">{Number}</span> <b>key</b>
												
											</dt>
											<dd>Key code for the button to be bound.</dd>
										
											<dt>
												<span class="light fixedFont">{String}</span> <b>button</b>
												
											</dt>
											<dd>An enchant.js button.</dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{<a href="../symbols/enchant.Core.html">enchant.Core</a>}</span> this</dd>
											
										
										
										
										
										
									
									</dl>
								
								<div class="hr"></div>
							</li>
						
							<li 
								 class='item4'
							>
								<div class="fixedFont heading" id="keyunbind">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{<a href="../symbols/enchant.Core.html">enchant.Core</a>}</span>
									
									<b>keyunbind</b>(key)
								</div>
								
								<div class="description">
									Delete the key binding for the given key.
									
									
									
									
								</div>
								
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<span class="light fixedFont">{Number}</span> <b>key</b>
												
											</dt>
											<dd>Key code whose binding is to be deleted.</dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{<a href="../symbols/enchant.Core.html">enchant.Core</a>}</span> this</dd>
											
										
										
										
										
										
									
									</dl>
								
								<div class="hr"></div>
							</li>
						
							<li 
								 class='item5'
							>
								<div class="fixedFont heading" id="load">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{<a href="../symbols/enchant.Deferred.html">enchant.Deferred</a>}</span>
									
									<b>load</b>(src, alias, callback, onerror)
								</div>
								
								<div class="description">
									Loads a file.
									
									
									
									
								</div>
								
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<span class="light fixedFont">{String}</span> <b>src</b>
												
											</dt>
											<dd>File path of the resource to be loaded.</dd>
										
											<dt>
												<span class="light fixedFont">{String}</span> <b>alias</b>
												<i>Optional</i>
											</dt>
											<dd>Name you want to designate for the resource to be loaded.</dd>
										
											<dt>
												<span class="light fixedFont">{Function}</span> <b>callback</b>
												<i>Optional</i>
											</dt>
											<dd>Function to be called if the file loads successfully.</dd>
										
											<dt>
												<span class="light fixedFont">{Function}</span> <b>onerror</b>
												<i>Optional</i>
											</dt>
											<dd>Function to be called if the file fails to load.</dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{<a href="../symbols/enchant.Deferred.html">enchant.Deferred</a>}</span> </dd>
											
										
										
										
										
										
									
									</dl>
								
								<div class="hr"></div>
							</li>
						
							<li 
								 class='item6'
							>
								<div class="fixedFont heading" id="pause">
									<span class='lighter'>
									
									</span>
									
									
									
									<b>pause</b>()
								</div>
								
								<div class="description">
									Stops the core.

The frame will not be updated, and player input will not be accepted anymore.
Core can be started again using <a href="../symbols/enchant.Core.html#resume">enchant.Core#resume</a>.
									
									
									
									
								</div>
								
								
								
								
								
								
								<div class="hr"></div>
							</li>
						
							<li 
								 class='item7'
							>
								<div class="fixedFont heading" id="popScene">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{<a href="../symbols/enchant.Scene.html">enchant.Scene</a>}</span>
									
									<b>popScene</b>()
								</div>
								
								<div class="description">
									Ends the current Scene and returns to the previous Scene.

Scenes are controlled using a stack, with the top scene on
the stack being the one displayed.
When <a href="../symbols/enchant.Core.html#popScene">enchant.Core#popScene</a> is executed, the Scene at
the top of the stack is removed and returned.
									
									
									
									
								</div>
								
								
								
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{<a href="../symbols/enchant.Scene.html">enchant.Scene</a>}</span> Removed Scene.</dd>
											
										
										
										
										
										
									
									</dl>
								
								<div class="hr"></div>
							</li>
						
							<li 
								 class='item8'
							>
								<div class="fixedFont heading" id="preload">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{<a href="../symbols/enchant.Core.html">enchant.Core</a>}</span>
									
									<b>preload</b>(assets)
								</div>
								
								<div class="description">
									File preloader.

Loads the files specified in the parameters when
<a href="../symbols/enchant.Core.html#start">enchant.Core#start</a> is called.
When all files are loaded, a <a href="../symbols/enchant.Event.html#.LOAD">enchant.Event.LOAD</a>
event is dispatched from the Core object. Depending on the
type of each file, different objects will be created and
stored in <a href="../symbols/enchant.Core.html#assets">enchant.Core#assets</a> Variable.

When an image file is loaded, a <a href="../symbols/enchant.Surface.html">enchant.Surface</a> is
created. If a sound file is loaded, an enchant.Sound
object is created. Any other file type will be accessible
as a string.

In addition, because this Surface object is created with
<a href="../symbols/enchant.Surface.html#.load">enchant.Surface.load</a>, it is not possible to
manipulate the image directly.
Refer to the <a href="../symbols/enchant.Surface.html#.load">enchant.Surface.load</a> documentation.
									
									
									
									
								</div>
								
								
									
										<pre class="code">core.preload('player.gif');
core.onload = function() {
    var sprite = new Sprite(32, 32);
    sprite.image = core.assets['player.gif']; // Access via path
    ...
};
core.start();</pre>
									
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<span class="light fixedFont">{...String|String[]}</span> <b>assets</b>
												
											</dt>
											<dd>Path of images to be preloaded.
Multiple settings possible.</dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{<a href="../symbols/enchant.Core.html">enchant.Core</a>}</span> this</dd>
											
										
										
										
										
										
									
									</dl>
								
								<div class="hr"></div>
							</li>
						
							<li 
								 class='item9'
							>
								<div class="fixedFont heading" id="pushScene">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{<a href="../symbols/enchant.Scene.html">enchant.Scene</a>}</span>
									
									<b>pushScene</b>(scene)
								</div>
								
								<div class="description">
									Switches to a new Scene.

Scenes are controlled using a stack, with the top scene on
the stack being the one displayed.
When <a href="../symbols/enchant.Core.html#pushScene">enchant.Core#pushScene</a> is executed, the Scene is
placed top of the stack. Frames will be only updated for the
Scene which is on the top of the stack.
									
									
									
									
								</div>
								
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<span class="light fixedFont">{<a href="../symbols/enchant.Scene.html">enchant.Scene</a>}</span> <b>scene</b>
												
											</dt>
											<dd>The new scene to display.</dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{<a href="../symbols/enchant.Scene.html">enchant.Scene</a>}</span> The new Scene.</dd>
											
										
										
										
										
										
									
									</dl>
								
								<div class="hr"></div>
							</li>
						
							<li 
								 class='item10'
							>
								<div class="fixedFont heading" id="removeScene">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{<a href="../symbols/enchant.Scene.html">enchant.Scene</a>}</span>
									
									<b>removeScene</b>(scene)
								</div>
								
								<div class="description">
									Removes a Scene from the Scene stack.

If the scene passed in as a parameter is not the current
scene, the stack will be searched for the given scene.
If the given scene does not exist anywhere in the stack,
this method returns null.
									
									
									
									
								</div>
								
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<span class="light fixedFont">{<a href="../symbols/enchant.Scene.html">enchant.Scene</a>}</span> <b>scene</b>
												
											</dt>
											<dd>Scene to be removed.</dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{<a href="../symbols/enchant.Scene.html">enchant.Scene</a>}</span> The deleted Scene.</dd>
											
										
										
										
										
										
									
									</dl>
								
								<div class="hr"></div>
							</li>
						
							<li 
								 class='item11'
							>
								<div class="fixedFont heading" id="replaceScene">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{<a href="../symbols/enchant.Scene.html">enchant.Scene</a>}</span>
									
									<b>replaceScene</b>(scene)
								</div>
								
								<div class="description">
									Overwrites the current Scene with a new Scene.

Executes <a href="../symbols/enchant.Core.html#popScene">enchant.Core#popScene</a> and <a href="../symbols/enchant.Core.html#pushScene">enchant.Core#pushScene</a>
one after another to replace the current scene with the new scene.
									
									
									
									
								</div>
								
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<span class="light fixedFont">{<a href="../symbols/enchant.Scene.html">enchant.Scene</a>}</span> <b>scene</b>
												
											</dt>
											<dd>The new scene with which to replace the current scene.</dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{<a href="../symbols/enchant.Scene.html">enchant.Scene</a>}</span> The new Scene.</dd>
											
										
										
										
										
										
									
									</dl>
								
								<div class="hr"></div>
							</li>
						
							<li 
								 class='item12'
							>
								<div class="fixedFont heading" id="resume">
									<span class='lighter'>
									
									</span>
									
									
									
									<b>resume</b>()
								</div>
								
								<div class="description">
									Resumes core operations.
									
									
									
									
								</div>
								
								
								
								
								
								
								<div class="hr"></div>
							</li>
						
							<li 
								 class='item13'
							>
								<div class="fixedFont heading" id="start">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{<a href="../symbols/enchant.Deferred.html">enchant.Deferred</a>}</span>
									
									<b>start</b>(deferred)
								</div>
								
								<div class="description">
									Start the core.

Sets the framerate of the <a href="../symbols/enchant.Core.html#currentScene">enchant.Core#currentScene</a>
according to the value stored in enchant.core#fps. If
there are images to preload, loading will begin and the
loading screen will be displayed.
									
									
									
									
								</div>
								
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<b>deferred</b>
												
											</dt>
											<dd></dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{<a href="../symbols/enchant.Deferred.html">enchant.Deferred</a>}</span> </dd>
											
										
										
										
										
										
									
									</dl>
								
								<div class="hr"></div>
							</li>
						
							<li 
								 class='item14'
							>
								<div class="fixedFont heading" id="stop">
									<span class='lighter'>
									
									</span>
									
									
									
									<b>stop</b>()
								</div>
								
								<div class="description">
									Stops the core.

The frame will not be updated, and player input will not be accepted anymore.
Core can be restarted using <a href="../symbols/enchant.Core.html#resume">enchant.Core#resume</a>.
									
									
									
									
								</div>
								
								
								
								
								
								
								
							</li>
						
					</ul>
				</div>
			</div>
		
		
<!--
#### EVENT DETAILS
-->		
		
	</div>
</div>
		<script type="text/javascript">
			wbos.CssTools.MediaQueryFallBack.LoadCss('../css/screen.css', '../css/handheld.css', 660)
			codeview.classFilter.Init()
		</script>
	</body>
</html>

